package cn.icanci.loopstack.ddk.admin.dal.mapper.mapper;

import cn.icanci.loopstack.ddk.admin.dal.mapper.entity.LockDO;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
* DdkLockMapper
* ⚠️ 修改之后请勿使用生成器再次生成，否则会覆盖修改
*
* @author icanci
* @since 1.0 Created in 2023/01/12 23:27
*/
@Mapper
public interface LockMapper {

    /**
     * 新增一条记录
     *
     * @param ddkLock 新增数据
     **/
    int insert(LockDO ddkLock);

    /**
     * 根据id删除一条记录
     *
     * @param key 主键
     * @param resource 资源
     **/
    int delete(@Param("key") Object key, @Param("resource") String resource, @Param("env") String env);

    LockDO queryByResource(@Param("resource") String resource, @Param("env") String env);
}
